date = input("请输入对应的天数: ")
dateArray = date.split("-")
year = int(dateArray[0])
month = int(dateArray[1])
day = int(dateArray[2])

days = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]

# 是否是闰年的判断
if (year % 4 == 0 and year % 100 != 0) or (year % 400 == 0):
    days[2] += 1

result = 0
for i in range(1, month):
    result += days[i]
result += day
print("%s 是 %s 年的第 %d 天" % (date, year, result))


